package com.offcn.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
public class TestController {

    @GetMapping("/set")
    public String set(HttpSession session){//spring包装后的redis
        session.setAttribute( "msg810","810" );
        return "ok";
    }

    @GetMapping("/get")
    public String get(HttpSession session){//spring包装后的redis
        return (String) session.getAttribute( "msg810" );
    }
}
